Skip to content

Conversation

@tgross35
Copy link
Contributor

No description provided.

GCC flags function return values that include `volatile` even through
typedefs, such as with this example from NetBSD:

    typedef unsigned char __cpu_simple_lock_nv_t;
    typedef volatile __cpu_simple_lock_nv_t __cpu_simple_lock_t;
    typedef __cpu_simple_lock_t pthread_spin_t;
    pthread_spin_t foo() { return 0; }

Ignore the warning for the scope where we emit these tests.
@rustbot rustbot added the ctest Issues relating to the ctest crate label Oct 28, 2025
@tgross35
Copy link
Contributor Author

As expected


running 5 tests
test test_entrypoint_invalid_syntax ... ok
cargo:warning=/tmp/.tmpoUibbp/simple.out.with-renames.c:265:14: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
cargo:warning=  265 | CTEST_EXTERN volatile_char ctest_roundtrip__volatile_char(
cargo:warning=      |              ^~~~~~~~~~~~~
cargo:warning=/tmp/.tmpGE2SNS/simple.out.with-skips.c:47:14: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
cargo:warning=   47 | CTEST_EXTERN volatile_char ctest_roundtrip__volatile_char(
cargo:warning=      |              ^~~~~~~~~~~~~
cargo:warning=cc1: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
cargo:warning=cc1: all warnings being treated as errors
error: test failed, to rerun pass `-p ctest --test basic`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ctest Issues relating to the ctest crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants